#ifndef WGL_OUTPUT_WINDOW_H
#define WGL_OUTPUT_WINDOW_H

#include "videooutput.h"

#include <GL/GLee.h>
#include <deque>

class WglOutputWindow
    : public VideoOutput
{
public:
    WglOutputWindow();
    virtual ~WglOutputWindow();
    
    void initialize(int width, int height, bool fullScreen);
    void destroy();
    void setWindowTitle(const std::string& title);
    void setFullScreen(bool enabled);
    void toggleVSync();
    void swapBuffers();
    bool hasClosed();
    bool checkResizeEvent(ResizeEvent& event);
    bool checkKeyEvent(KeyEvent& event);
    bool checkFiledropEvent(FiledropEvent& event);
    static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
        
private:
    static bool setupPixelFormat();

	static HWND	                    m_Window; 
	static HDC		                m_DeviceContext; 
	static HGLRC	                m_RenderContext;

    static std::deque<KeyEvent>     m_EventQueue;
    static ResizeEvent              m_ResizeEvent;
    static FiledropEvent            m_FiledropEvent;
    static bool                     m_HasClosed;
};

#endif
